send to program
Type
command
Summary
Sends an Apple event to a program.
Syntax
send <message> to {program | application} <programAddress> [with <classID>] [{with | without} reply]
Description
Use the send to program command to cause another application to take some action via the Apple event or another Apple event you specify.
Theandforms are synonyms.
If you specify theform, the handler pauses until the application sends back a response. If you specify theform, the handler continues immediately without waiting. If you don't specify either form, theform is used.
To display the process browser dialog box and allow the user to choose a running program, use the following statement :
For more information about Apple events, see Apple Computer's technical documentation, Inside Macintosh: Interapplication Communication, located at [Apple's developer site] (https://developer.apple.com/library/archive/documentation/mac/IAC/IAC-2.html).
Parameters
Name | Type | Description |
---|---|---|
message | The message you want the other application to execute (the data attached to the Apple event you are sending). Its exact format and meaning depends on the other application. | |
programAddress | The AppleTalk address of the other program. The AppleTalk address consists of three parts, separated by colons: the zone the other computer is in, the name of the computer, and the name of the target program. If the other computer is in the same zone as yours, you can omit the zone. If the other program is running on the same computer, you can omit both the zone and the computer name. | |
classID | string | A string consisting of the 4-character Apple event class and the 4-character event ID. If you don't specify a classID, LiveCode uses "" : theclass and the event. |
Examples
send "message" to program "Corporate Zone:Other Mac:LiveCode"
send field "output" to application "FileMaker" without reply
send "message" to program "Chrome" with "GURLGURL"
Related
glossary: dialog box, Apple Event, statement, command
keyword: without
message: appleEvent
property: address
command: request, reply, request appleEvent
control structure: function
Compatibility and Support
Introduced
LiveCode 1.0
OS
mac
Platforms
desktop
server